/**
 *
 */
package com.angel.mocks.dao.generic;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;

import com.angel.architecture.persistence.base.PersistentObject;

/**
 * @author William
 *
 */
@Entity
public class Exam extends PersistentObject{

	private static final long serialVersionUID = -2400829760700206259L;
	@ManyToOne(optional = false, cascade = CascadeType.ALL)
	private Teacher teacher;
	@OneToOne(cascade = CascadeType.ALL)
	private Person person;

	public Exam(){
		super();
	}

	public Exam(Teacher teacher, Person person){
		this.teacher = teacher;
		this.person = person;
	}

	/**
	 * @return the teacher
	 */
	public Teacher getTeacher() {
		return teacher;
	}

	/**
	 * @param teacher the teacher to set
	 */
	public void setTeacher(Teacher teacher) {
		this.teacher = teacher;
	}

	/**
	 * @return the person
	 */
	public Person getPerson() {
		return person;
	}

	/**
	 * @param person the person to set
	 */
	public void setPerson(Person person) {
		this.person = person;
	}

}
